package com.qf.service;

import com.netflix.ribbon.proxy.annotation.Hystrix;
import com.qf.dto.ProductTypeDTO;
import com.qf.entity.TProductType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.client.RestTemplate;

import java.util.List;

/**
 * @author LiuLiang
 * @Date 2020/3/10
 */
@Service
public class ProductTypeService {
    @Autowired
    private RestTemplate restTemplate;

    public List<ProductTypeDTO> selectAll(){
        return restTemplate.getForObject("http://spring-cloud-service-index/selectAll",List.class);
    }
}
